import request from '@/utils/request'
import {baseUrlConfig} from "@/config/config";

const basePath = baseUrlConfig.businessBaseUrl;

//获取分页列表
export const securityUnitListPage = (data: any)  => {
  return request({
    url: basePath + '/externalUnit/findPage',
    method: 'post',
    data
  })
}

// 获取单位类型列表
export const getCatalogueList = () => {
  return request({
    url: basePath + '/department/findAll',
    method: 'get'
  })
}

// 获取所有模板Json
export const getFormJson = () => {
  return request({
    url: basePath + '/templateDetails/findAll',
    method: 'get'
  })
}

// 新增
export const addSave = (data: any) => {
  return request({
    url: basePath + '/externalUnit/add',
    method: 'post',
    data
  })
}

// 编辑
export const editSave = (data: any) => {
  return request({
    url: basePath + '/externalUnit/put',
    method: 'put',
    data
  })
}

//删除
export const deleteSecurityUnit = (data: any) => {
  return request({
    url: basePath + "/externalUnit/del",
    method: 'delete',
    data
  })
}
